﻿@using Inovout.Descriptor
@model IEnumerable<KuaJing.Organization.Domain.Employee>
<div class="iui-panel">
    <h1>员工查询</h1>
    <div class="row form-inline">
        @using (Html.BeginForm())
        {
            <div class="col-md-10">
                @Html.Query()
            </div>
            <div class="col-md-2">
                @Html.Submit("查询", new { @class = "btn btn-default btn-primary" })
            </div>
        }
    </div>
</div>
<div class="iui-panel iui-panel-table">
    <h1>
        员工列表
        <span class="ico-add">
            @Html.ActionLink("员步263员工", "Sync263", new { ReturnUrl = Request.Url })
            @Html.ActionLink("新增", "Edit", new { ReturnUrl = Request.Url })
        </span>
    </h1>
    <div>
        @Html.Table(() => "没有员工数据" + Html.ActionLink("新增", "Edit", new { ReturnUrl = Request.Url })).Build(properties =>
   {
       properties.Extend("姓名", m => m.Person.Name);
       properties.Extend("部门", m => m.Organization == null ? null : m.Organization.Name);
       properties.Add(m => m.EMail);
       properties.Add(m => m.OfficePhone);
       properties.Extend("操作", v => Html.ActionLink("编辑", "Edit", new { Id = v.Id, ReturnUrl = Request.Url }),
                                 v => Html.ActionLink("删除", "Delete", new { Id = v.Id, ReturnUrl = Request.Url }));
   })
    </div>
</div>
